package com.jingsheng.jingshengcity.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.jingsheng.jingshengcity.mvp.contract.TransactionRecordsContract;
import com.jingsheng.jingshengcity.mvp.model.TransactionRecordsModel;

import dagger.Module;
import dagger.Provides;


/**
 * Created by Administrator on 2017/5/12.
 */

@Module
public class TransactionRecordsModule {
    private TransactionRecordsContract.View view;

    /**
     * 构建TransactionRecordsModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public TransactionRecordsModule(TransactionRecordsContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    TransactionRecordsContract.View provideTransactionRecordsView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    TransactionRecordsContract.Model provideTransactionRecordsModel(TransactionRecordsModel model) {
        return model;
    }
}